import BTTree from 'db://app-game/libs/math/behavior-tree/base/BTTree';
import CompositeSelector from 'db://app-game/libs/math/behavior-tree/biz/composite/CompositeSelector';
import CompositeSequence from 'db://app-game/libs/math/behavior-tree/biz/composite/CompositeSequence';
import ConditionalCircleMonitor from '../conditional/ConditionalCircleMonitor';

/** 怪兽行为树 */
export default class MonsterBTTree extends BTTree {
  constructor() {
    super();
    this.init();
  }

  init() {
    this.root = new CompositeSequence([
      new CompositeSelector([
        new CompositeSequence([new ConditionalCircleMonitor(), new ActionCreaturePathMove()]),
        // new CompositeSequence([
        //   new ConditionalCreatureAttackRange(),
        //   new ActionCreatureTargetMove(),
        // ]),
        // new CompositeSequence([
        //   new ConditionalCreatureEnemyDeaths(),
        //   new ActionAttack(),
        // ]),
      ]),
    ]);
  }
}
